/*
 * For.cpp
 *
 *  Created on: 06/05/2010
 *      Author: rodolfo
 */

#include "For.h"

For::For() : IterationStatement ( Statement::forStm )
{

}

For::~For()
{
	if ( declaration != 0 )
		delete declaration;
	if ( inc != 0 )
	    delete inc;
	if ( condition != 0 )
		delete condition;
}

For::For ( ExpressionStatement *declaration, ExpressionStatement *condition, Expression *inc, Statement *command ) :
        declaration ( declaration ), condition ( condition ), inc ( inc ), IterationStatement ( command, Statement::forStm )
{
}

For::For ( ExpressionStatement *declaration, ExpressionStatement *condition, Statement *command ) :
        declaration ( declaration ), condition ( condition ), IterationStatement ( command, Statement::forStm )
{
}
